Instance Methods

The following instance methods are available globally.

  • Register given UITableViewCell in tableView. Cell will be registered with the name of it’s class as identifier.

    Declaration

    Swift

    public func register<T : UITableViewCell>(_: T.Type)
  • Register given UITableViewCell in tableView. Cell will be registered with the name of it’s class as identifier.

    Declaration

    Swift

    public func registerNib<T : UITableViewCell>(_: T.Type)
  • Dequeue cell of given class from tableView.

    Declaration

    Swift

    public func dequeue<T : UITableViewCell>(_: T.Type) -> T
  • Dequeue cell of given class from tableView.

    Declaration

    Swift

    public func dequeue<T : UICollectionViewCell>(_: T.Type, indexPath: IndexPath) -> T
  • Register given UICollectionViewCell in collectionView. Cell will be registered with the name of it’s class as identifier.

    Declaration

    Swift

    public func register<T : UICollectionViewCell>(_: T.Type)
  • Register UICollectionViewCell from given nib in collectionView. Cell will be registered with the name of it’s class as identifier.

    Declaration

    Swift

    public func registerNib<T : UICollectionViewCell>(_: T.Type)
  • Collapse expanded cell.

    Declaration

    Swift

    public func collapseCells(animated: Bool = default)

    Parameters

    animated

    should animate changing tableView’s frame.

  • Declaration

    Swift

    public func expand(viewController: ElongationDetailViewController, animated: Bool = default, completion: (() -> Void)? = default)

    Parameters

    viewController

    ElongationDetailViewController subclass which will be added to view hierarchy.

    animated

    Should the transition be animated.

    completion

    Optional callback which will be called when transition completes.

  • Must call super if you override this method in subclass.

    Declaration

    Swift

    open override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)
  • Must call super if you override this method in subclass.

    Declaration

    Swift

    open override func scrollViewDidScroll(_ scrollView: UIScrollView)
  • Present modal view controller for cell at given IndexPath.

    Declaration

    Swift

    open func openDetailView(for indexPath: IndexPath)

    Parameters

    indexPath

    IndexPath of source cell.

  • Expand cell at given IndexPath. View must be in normal state.

    Declaration

    Swift

    public func expandCell(at indexPath: IndexPath)

    Parameters

    indexPath

    IndexPath of target cell

  • This transition object will be used while presenting ElongationDetailViewController.

    Declaration

    Swift

    public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning?
  • This transition object will be used while dismissing ElongationDetailViewController.

    Declaration

    Swift

    public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning?
  • Apply dark overlay above the cell.

    Declaration

    Swift

    open func dim(_ value: Bool, animated: Bool = default)

    Parameters

    value

    true if the cell must be dimmed

    animated

    should it be animated

  • Expand or collapse the cell.

    Declaration

    Swift

    open func expand(_ value: Bool, animated: Bool = default, completion: ((Bool) -> Void)? = default)

    Parameters

    value

    true if the cell must be expanded

    animated

    should it be animated